import 'package:flutter/material.dart';
import '../Search.dart';
class shopPing extends StatelessWidget{
  Widget build(BuildContext context){
    return ListView(
      children: <Widget>[
        Text("购物"),
        RaisedButton(
          child: Text("跳转到搜索页面"),
          onPressed: (){
            Navigator.of(context).push(
              MaterialPageRoute(
                builder: (context)=>SearchPage(title:"路由带参跳转")
              )
            );
          },
        ),
        Wrap(
          spacing: 10,
          runSpacing: 10,
          children: <Widget>[
            MyButton("第一季"),
            MyButton("第二季"),
            MyButton("第三季"),
            MyButton("第一季"),
            MyButton("第二季"),
            MyButton("第三季"),
            MyButton("第一季"),
            MyButton("第二季"),
            MyButton("第三季"),
          ],
        ),
      ],
    );
  }
}
class MyButton extends StatelessWidget{
  String ButtonName;
  MyButton(this.ButtonName,{Key key});
  Widget build(BuildContext context){
    return RaisedButton(
      
      child: Text(this.ButtonName),
      onPressed: (){
        print(this.ButtonName);
      },
    );
  }
}